﻿@model GsifWeb4.ViewModels.PhoneListViewModel

<h2>Telefonlista</h2>

<div>
    <fieldset>
        @{              
            Html.BeginForm();
            foreach (var teamCheckbox in Model.Teams)
            {
            @Html.CheckBox(teamCheckbox.Text, teamCheckbox.Checked, new { style = "vertical-align: middle; margin: 0px;" }) 
            <text>@teamCheckbox.Text &nbsp&nbsp</text>                    
            }
            <input name="searchForTeams" type="submit" value="Sök" class="btn" />
            Html.EndForm();
        }
    </fieldset>
</div>

<div class="grid">

    <table class="table table-striped">
        <thead>
            <tr>
                <th>Namn</th>
                <th>Hem</th>
                <th>Arbete</th>
                <th>Mobil</th>
                <th>Email</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var player in Model.Players)
            {
                <tr>
                    @*<td><img src="@player.BildLiten" width='33' height='40' /></td>*@
                    <td>@Html.ActionLink(player.FNamn + " " + player.ENamn, "ShowPlayer", "Player", new { id = player.ID }, null)</td>
                    <td>@player.TfnNr</td>
                    <td>@player.ArbNr</td>
                    <td>@player.MobilNr</td>
                    <td>@player.Email</td>
                </tr>
            }
        </tbody>
    </table>
</div>
